package com.xls.box2023.tuiguangyouxi;

import android.content.Context;

import com.lzz.bottomencapsulation.net.RequestCallBack;
import com.lzz.bottomencapsulation.net.RetrofitBase;
import com.xls.box2023.entity.AppTeamUsersEntity;
import com.xls.box2023.network.RequestManager;

public class TuiGuangYouXiUtils {
    /**
    * 单例模式
    **/
    private static TuiGuangYouXiUtils mTuiGuangYouXiUtils = null;
        /**
         * 构造函数私有化
         **/
        private TuiGuangYouXiUtils() {
        }
        /**
         * 公有的静态函数，对外暴露获取单例对象的接口
         **/
        public static TuiGuangYouXiUtils getInstance() {
            if (mTuiGuangYouXiUtils == null) {
                synchronized (TuiGuangYouXiUtils.class) {
                    if (mTuiGuangYouXiUtils == null) {
                        mTuiGuangYouXiUtils = new TuiGuangYouXiUtils();
                    }
                }
            }
            return mTuiGuangYouXiUtils;
        }

        public void getAppTeamUsers(Context context, String appID, String packageName,String startTime,String endtime, RequestCallBack<AppTeamUsersEntity> callBack){
            RetrofitBase.getInstace(context).setSubscribe(context, RequestManager.getInstance(context).
                    getAppTeamUsers(appID,packageName,startTime,endtime), callBack);
        }

    public void getTeamUsers(Context context,String startTime,String endtime, RequestCallBack<AppTeamUsersEntity> callBack) {
        RetrofitBase.getInstace(context).setSubscribe(context, RequestManager.getInstance(context).
                getTeamUsers(startTime,endtime), callBack);
    }
}
